$(document).ready(function () {
    let commonInstitutionId = localStorage.getItem("commonInstitutionId");
    if (commonInstitutionId != '') {
        $(".institutionItemTabDiv").show();
        $(".violationCategoryItemTabDiv").hide();
        $(".institutionMenuDiv").css({"background": "#1D558E", "border": "1px solid #1D558E", "color": "#FFFFFF"})
        $(".violationMenuDiv").css({"background": "#FFFFFF", "border": "1px solid #707070", "color": "#585858"})
    }
    //切换违规记录和医疗机构
    $(".institutionMenuDiv").on('click', function (e) {
        $(".institutionItemTabDiv").show();
        $(".violationCategoryItemTabDiv").hide();
        $(".institutionMenuDiv").css({"background": "#1D558E", "border": "1px solid #1D558E", "color": "#FFFFFF"})
        $(".violationMenuDiv").css({"background": "#FFFFFF", "border": "1px solid #707070", "color": "#585858"})
    });

    $(".violationMenuDiv").on('click', function (e) {
        $(".violationCategoryItemTabDiv").show();
        $(".institutionItemTabDiv").hide();
        $(".violationMenuDiv").css({"background": "#1D558E", "border": "1px solid #1D558E", "color": "#FFFFFF"})
        $(".institutionMenuDiv").css({"background": "#FFFFFF", "border": "1px solid #707070", "color": "#585858"})
    });

    //药品查询界面
    $(".drugFontDiv").on('click', function (e) {
        WeKnow.location("drugsQuery");
        WeKnow.closeLoading();
    });

    //拍照界面
    $(".preSelectDiv").on('click', function (e) {
        WeKnow.location("takePicture");
        WeKnow.closeLoading();
    });

    //医疗机构违规记录界面
    $("#violationCategoryFontDivId,.violationCategorySearchDiv").on('click', function (e) {
        WeKnow.location("queryInstitution");
        WeKnow.closeLoading();
    });
});